import http from "@/utils/http";

export function getChineseMedicineByPage(url, { page, limit, where }) {
  return http.post(`${url}/api/chineseMedicine/getByPage`, {
    params: {
      page,
      limit,
      where,
    },
  });
}
export function addChineseMedicine(obj) {
  return http.post("/api/chineseMedicine/add", obj);
}
export function delChineseMedicineBySn(sn) {
  return http.post("/api/chineseMedicine/del/" + sn);
}
export function updateChineseMedicine(sn, obj) {
  return http.post("/api/chineseMedicine/update" + sn, obj);
}
export function bulkCreate(url, data) {
  return http.post(`${url}/api/chineseMedicine/bulkCreate`, data);
}
export function getDepartment(url) {
  return http.get(`${url}/api/chineseMedicine/getDepartment`);
}
export function getSex(url) {
  return http.get(`${url}/api/chineseMedicine/getSex`);
}
export function getAge(url) {
  return http.get(`${url}/api/chineseMedicine/getAge`);
}
export function getPos(url) {
  return http.get(`${url}/api/chineseMedicine/getPos`);
}
export function getPdfByName(url, params) {
  return http.post(`${url}/api/chineseMedicine/getPdfByName`, { params });
}
export function getImgsByName(url, params) {
  return http.post(`${url}/api/chineseMedicine/getImgsByName`, { params });
}
export function getForceByName(url, params) {
  return http.post(`${url}/api/chineseMedicine/getForceByName`, { params });
}
export function getPoseByName(url, params) {
  return http.post(`${url}/api/chineseMedicine/getPoseByName`, { params });
}
export function uploadImage(url, params) {
  return http.post(`${url}/predict`,params);
}


